<template xmlns="http://www.w3.org/1999/html">
  <div>
    <param-item :param="param.left" class="float-left"/>

    <div class="float-left">
      <el-select v-model="param.operator" :clearable=true filterable placeholder="数学运算符" class="ele-left">
        <el-option v-for="t in mathOperatorList" :label="t.name+' '+t.value" :value="t.value" :key="t.value"/>
      </el-select>
    </div>

    <param-item :param="param.right"/>
  </div>
</template>

<script>
import paramItem from "./item/paramItem.vue";

export default {
  name: 'ifExpress',
  components: {paramItem},
  props: ["param"],
  data() {
    return {
      mathOperatorList: [
        {name: "等于", value: "=="},
        {name: "大于", value: ">"},
        {name: "大于等于", value: ">="},
        {name: "小于", value: "<"},
        {name: "小于等于", value: "<="}]
    }
  }
}
</script>

<style>
.float-left {
  float: left;
  margin-right: 20px;
}

.ele-left {
  width: 300px;
  text-align: left
}
</style>
